package cn.seecoder.ai.model.vo;

import cn.seecoder.ai.enums.LearningTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author fanyanpeng
 * @date 2023/4/11 23:08
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class ConfigVO {

    private Integer id;

    @NotNull(message = "userId，用户id不能为空")
    private Integer userId;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @NotNull(message = "learningType，学习类型不能为空，可选值为：UNSUPERVISED_LEARNING、SUPERVISED_LEARNING")
    private LearningTypeEnum learningType;

    @NotNull(message = "文件信息id不能为空")
    private Integer fileInfoId;

    // 可以为null
    private Integer testFileInfoId;

    @NotEmpty(message = "配置名不能为空")
    private String configName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createdTime;

    private String label;

    private List<String> features;

    @ApiModelProperty("文件名")
    private String fileInfoName;

    public Integer getId() {
        return id;
    }

    public Integer getUserId() {
        return userId;
    }

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    public LearningTypeEnum getLearningType() {
        return learningType;
    }

    public Integer getFileInfoId() {
        return fileInfoId;
    }

    public Integer getTestFileInfoId() {
        return testFileInfoId;
    }

    public String getFileInfoName() {
        return fileInfoName;
    }

    public String getConfigName() {
        return configName;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public String getLabel() {
        return label;
    }

    public List<String> getFeatures() {
        return features;
    }
}
